namespace classifier_test
{

class conceptual_data_generator : public virtual virtual_object, private noncopyable
{
public:
	conceptual_data_generator();
	conceptual_data_generator(const conceptual_data_generator& Val);
	virtual smart_ptr<conceptual_data_generator> clone() const = 0;
	virtual const record_scheme& get_scheme() const = 0;
	virtual int get_concept_count() const = 0;
	virtual void open();
	virtual void close();
	virtual void generate(int Con, record& Rec) const = 0;
};

class conceptual_stream : public data_stream
{
public:
	conceptual_stream();
	const record_scheme& get_scheme() const;
	conceptual_data_generator* get_generator() const;
	void set_generator(conceptual_data_generator* Val);
	bool get_exact_period() const;
	void set_exact_period(bool Val);
	double get_changing_freq() const;
	void set_changing_freq(double Val);

	void open();
	void close();
	bool eof();
	void read(stream_record& Rec);

private:
	smart_ptr<conceptual_data_generator> Generator;
	bool ExactPeriod;
	double ChangingFreq;

	int ConceptCount;
	double Time, NextTime;
	int CurrentConcept;

	double random_time(double Average) const;
	bool occur_in_time(double Freq) const;
};

}
